package community.hospital.common;

import community.hospital.entity.User;
import community.hospital.entity.response.UserResponse;

/**
 * @Author：ydj
 * @Date：2023/1/17 14:25
 */
public class LoginUserHolder {
    public static  ThreadLocal<UserResponse> threadLocal = new ThreadLocal<>();

    public static UserResponse getUser() {
        return threadLocal.get();
    }

    public static void setUser(UserResponse user) {
        threadLocal.set(user);
    }

    public static void remove() {
        threadLocal.remove();
    }
}
